USE [codbsf]
GO

/****** Object:  Table [dbo].[products]    Script Date: 12/08/2011 19:28:15 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[products](
	[idProduct] [int] IDENTITY(1,1) NOT NULL,
	[idCategory] [int] NOT NULL,
	[name] [varchar](200) NOT NULL,
	[currentPrice] [money] NOT NULL,
	[image] [varchar](100) NOT NULL,
	[active] [bit] NOT NULL,
 CONSTRAINT [PK_products] PRIMARY KEY CLUSTERED 
(
	[idProduct] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[products]  WITH CHECK ADD  CONSTRAINT [FK_products_category] FOREIGN KEY([idCategory])
REFERENCES [dbo].[category] ([idCategory])
GO

ALTER TABLE [dbo].[products] CHECK CONSTRAINT [FK_products_category]
GO


